package com.cosyhut.blocks.factory;

import com.cosyhut.blocks.jode.*;

public class MGeomSphere extends MGeom{
	private float _radius;
	
	public MGeomSphere(String model, Material material, int radius) {
		super(model, jodeConstants.dSphereClass, material);
		this._radius = BFactory.units(radius);
		init();
	}
	
	protected void calculateVolume() {
        this._volume = (float)(( 4.0 / 3.0 ) * Math.PI * Math.pow( this._radius, 3 ));
	}
	//--------------------------------------------------------------------------
	public float getRadius() {
		return this._radius;
	}
}
